﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Prototype
{
    public class Resume
    {
        private string _name;

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }
        private string _age;

        public string Age
        {
            get { return _age; }
            set { _age = value; }
        }
        private string _sex;

        public string Sex
        {
            get { return _sex; }
            set { _sex = value; }
        }
        private WorkExpress work;
        public Resume(string name)
        {
            this._name = name;
            work = new WorkExpress();
        }
        public Resume(WorkExpress workClone)
        {
            this.work = (WorkExpress)workClone.Clone();
        }
        public void SetPersonInfo(string age,string sex)
        {
            this._age = age;
            this._sex = sex;
        }
        public void SetWorkExpress(string workDate,string company)
        {
            work.WorkDate = workDate;
            work.Compay = company;
        }
        public void Display()
        {
            Console.WriteLine("{0}{1}{2}",_name,_age,_sex);
            Console.WriteLine("{0}{1}",work.Compay,work.WorkDate);
        }
        public object Clone()
        {
            Resume obj = new Resume(this.work);
            obj.Name = this._name;
            obj.Sex = this._sex;
            obj.Age = this._age;
            return obj;
        }
    }
}
